
#ifndef __ENGINE_DEBUG_STREAM_included
#define __ENGINE_DEBUG_STREAM_included

#pragma warning( disable : 4996)

#include <map>
#include <iostream>
#include <boost/thread.hpp>

using namespace std;

namespace Engine {

class CDebugStream {

	map<boost::thread::id, std::string> mBuffers;

public :

	CDebugStream &write( const char *text );
	CDebugStream &writeCurrentTime();

	CDebugStream &operator <<( bool v );
	CDebugStream &operator <<( short v );
	CDebugStream &operator <<( unsigned short v );
	CDebugStream &operator <<( int v );
	CDebugStream &operator <<( unsigned int v );
	CDebugStream &operator <<( long v );
	CDebugStream &operator <<( unsigned long v );
	CDebugStream &operator <<( float v );
	CDebugStream &operator <<( double v );
	CDebugStream &operator <<( long double v );
	CDebugStream &operator <<( const void *v );
	CDebugStream &operator <<( const char *v );
	CDebugStream &operator <<( char c );
	CDebugStream &operator <<( const std::string &s );

};

extern CDebugStream DebugStream;

}

#endif //__ENGINE_DEBUG_STREAM_included